import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
	globalStyle: {
		navigationStyle: 'default',
		navigationBarTitleText: 'uniapp',
		navigationBarBackgroundColor: '#f8f8f8',
		navigationBarTextStyle: 'white',
		backgroundColor: '#000000',
	},
	easycom: {
		autoscan: true,
		custom: {
			'^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
			'^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
				'z-paging/components/z-paging$1/z-paging$1.vue',
		},
	},
	tabBar: {
		color: '#aaa',
		selectedColor: '#39b54a',
		backgroundColor: '#F8F8F8',
		borderStyle: 'black',
		height: '50px',
		fontSize: '11px',
		iconWidth: '24px',
		spacing: '3px',
		list: [
			{
				"iconPath": "/static/tabbar/home.png",
				"selectedIconPath": "/static/tabbar/home2.png",
				"pagePath": "pages/index/index",
				"text": "首页"
			},
			{
				"iconPath": "/static/tabbar/doff.png",
				"selectedIconPath": "/static/tabbar/don.png",
				"pagePath": "pages/device/device",
				"text": "设备"
			},
			{
				"iconPath": "/static/tabbar/car.png",
				"selectedIconPath": "/static/tabbar/car2.png",
				"pagePath": "pages/car/index",
				"text": "车辆"
			},
			{
				"iconPath": "/static/tabbar/user.png",
				"selectedIconPath": "/static/tabbar/user2.png",
				"pagePath": "pages/user/people",
				"text": "我的"
			}
		],
	},
	pages: [
		{
			"path": "pages/index/index",
			"type": "home",
			"layout": "default",
			"style": {
				"navigationStyle": "custom",
				"navigationBarTitleText": "首页",
				"disableScroll": true,
				"app-plus": {
					"bounce": "none"
				}
			}
		},
		{
			"path": "pages/car/index",
			"type": "page",
			"layout": "default",
			"style": {
				"navigationBarTitleText": "",
				"navigationStyle": "custom",
				"disableScroll": true,
				"app-plus": {
					"bounce": "none"
				}
			}
		},
		{
			"path": "pages/device/device",
			"type": "page",
			"style": {
				"navigationStyle": "custom",
				"navigationBarTitleText": "",
				"disableScroll": true,
				"app-plus": {
					"bounce": "none"
				}
			}
		},
		{
			"path": "pages/login/login",
			"type": "page",
			"style": {
				"navigationStyle": "custom",
				"navigationBarTitleText": "",
				"disableScroll": true,
				"app-plus": {
					"bounce": "none"
				}
			}
		},
		{
			"path": "pages/login/loginOauth2",
			"type": "page",
			"style": {}
		},
		{
			"path": "pages/user/people",
			"type": "page",
			"layout": "default",
			"style": {
				"navigationStyle": "custom",
				"navigationBarTitleText": "个人",
				"disableScroll": true,
				"app-plus": {
					"bounce": "none"
				}
			}
		},
	],
	subPackages: [
		{
			root: "pages-invite",
			pages: [
				{
					"path": "inviteCode/inviteCode",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "邀请码",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				}
			]
		},
		{
			root: "pages-user",
			pages: [
				{
					"path": "userDetail/userDetail",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				},
				{
					"path": "userEdit/userEdit",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				},
				{
					"path": "userPassword/userPassword",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "密码修改",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				}
			]
		},
		{
			root: "pages-authentica",
			pages: [
				{
					"path": "authentica/authentica",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				},
			]
		},
		{
			root: 'pages-privacy',
			pages: [
				{
					"path": "privacy/privacy",
					"type": "page",
					"layout": "default",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"disableScroll": true,
						"app-plus": {
							"bounce": "none"
						}
					}
				}
			]
		}
	]
})